using UnityEngine;

public class PurchaseResultSymButton : MonoBehaviour
{
	public enum Result
	{
		purchaseAlreadyOwned = 0,
		purchaseCantVerifySignature = 1,
		purchaseSignatureNotAccepted = 2,
		purchaseConsumeFailed = 3,
		purchaseUnknownError = 4,
		purchaseFailed = 5,
		purchaseCanceled = 6,
		purchaseComplete = 7
	}

	public Result result;

	private InAppPurchase.InAppObject obj;

	public void Init(InAppPurchase.InAppObject obj)
	{
		this.obj = obj;
	}

	public void OnClick()
	{
		GGInAppPurchase instance = GGInAppPurchase.instance;
		string value = string.Empty;
		if (obj != null)
		{
			value = obj.productId;
		}
		GameObject.Find("GGInAppPurchase").SendMessage(result.ToString(), value);
	}
}
